﻿using System;
using System.Threading;

namespace Jayden.Dll.Core.Logging
{
	public class LogRecord
	{
		private Level m_Level;
		private string m_LoggerName;
		private string m_Message;
		private DateTime m_DateTime;
		private object[] m_Parameters;
		private string m_SourceClassName;
		private string m_SourceMethodName;
		private int m_ThreadId;
		private Exception m_Exception;

		public LogRecord(string loggerName, Level level, string message)
		{
			m_LoggerName = loggerName;
			m_Level = level;
			m_Message = message;
			m_DateTime = DateTime.Now;
			m_ThreadId = Thread.CurrentThread.ManagedThreadId;
		}

		public Level Level { get { return m_Level; } set { m_Level = value; } }
		public string LoggerName { get { return m_LoggerName; } set { m_LoggerName = value; } }
		public string Message { get { return m_Message; } set { m_Message = value; } }
		public DateTime DateTime { get { return m_DateTime; } set { m_DateTime = value; } }
		public object[] Parameters { get { return m_Parameters; } set { m_Parameters = value; } }
		public string SourceClassName { get { return m_SourceClassName; } set { m_SourceClassName = value; } }
		public string SourceMethodName { get { return m_SourceMethodName; } set { m_SourceMethodName = value; } }
		public int ThreadId { get { return m_ThreadId; } set { m_ThreadId = value; } }
		public Exception Exception { get { return m_Exception; } set { m_Exception = value; } }
	}
}
